/*
 *
 *      Copyright (c) 2018-2025, cloud All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the pig4cloud.com developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: cloud
 *
 */

package com.fuyao.cloud.admin.api.feign;

import com.fuyao.cloud.common.core.constant.ServiceNameConstants;
import com.fuyao.cloud.common.core.util.DictItemOption;
import com.fuyao.cloud.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * 字典加载路由类。
 *
 * @author ly
 * @date 20211112
 */
@FeignClient(contextId = "remoteDictItemService", value = ServiceNameConstants.UPMS_SERVICE)
public interface RemoteDictItemService {

	/**
	 * 根据类型加载字典信息
	 * @param type 类型
	 * @return 字典可选项集合 label,value
	 */
	@PostMapping("/dictItem/type/{type}")
	R<Map<String,List<DictItemOption>>> getDictItemByType(@PathVariable("type") String type) ;

	/**
	 * 根据类型集合加载多个字典信息
	 * @param types 类型
	 * @return 字典可选项集合 label,value
	 */
	@PostMapping("/dictItem/getDictItemList")
	R<Map<String,List<DictItemOption>>> getDictItemList(@RequestBody List<String> types) ;

}
